Simply double click the "Click to run" file for your respective OS (.bat for windows, .sh for Linux), or copy paste this in terminal in the servers directory "java -Xmx2G -jar "New Vanilla Server.jar" nogui" if you don't trust me enough, which is fair (also, you can shift+right click on windows to open directory in terminal)
(You will need accept the EULA)


Once you got it set up, here is how you join:
Local Network (Same Wi-Fi)
Bedrock:
Open Minecraft Bedrock Edition

Go to Play > Servers > Add Server

For Server Address, enter the host computer’s IPv4 address

Example: 012.345.6.789

You can find it by typing ipconfig in Command Prompt on the host or going to Wi-Fi settings in most OS

For Port, enter 19132

Click Save or Play

Java Edition:
Open Minecraft Java Edition

Click Multiplayer > Add Server

For Server Address, enter:

Copy code
012.345.6.789:25565
(Replace 012.345.6.789 with the host’s local IPv4 address)

Click Done and Join

Worldwide (Over the Internet)
You’ll need a tunneling service to safely share the server.

Option 1: Using Playit.gg
Download and run Playit on the host computer
https://playit.gg/download

It will show you public IP addresses and ports like:

Java: 123-456.playit.gg:25565

Bedrock: 123-456.playit.gg:19132

Share the correct address and port with your friends:

Java players use that IP in their multiplayer list

Bedrock players use it in the Add Server screen


DON'T EVER share any of your IPs publicly
